package top.hepingan.java.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author author
 * @since 2025-11-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("red_packet")
@ApiModel(value="RedPacket对象", description="")
public class RedPacket implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "红包ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "红包总金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "红包总个数")
    @TableField("total_count")
    private Integer totalCount;

    @ApiModelProperty(value = "剩余金额")
    @TableField("remain_amount")
    private BigDecimal remainAmount;

    @ApiModelProperty(value = "剩余个数")
    @TableField("remain_count")
    private Integer remainCount;

    @ApiModelProperty(value = "红包类型：0普通红包，1拼手气红包")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "最小浮动比例，例如0.8表示最低为平均值的80%")
    @TableField("min_ratio")
    private BigDecimal minRatio;

    @ApiModelProperty(value = "最大浮动比例，例如1.2表示最高为平均值的120%")
    @TableField("max_ratio")
    private BigDecimal maxRatio;

    @ApiModelProperty(value = "状态：0可领取，1已领完，2已过期 3以作废")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "过期时间")
    @TableField("expire_time")
    private LocalDateTime expireTime;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;
}
